require("lfs")
local Workspace
do
  local _base_0 = {
    printwd = function(self)
      local pwd = lfs.currentdir()
      return print(pwd)
    end,
    symlink = function(self, s, t)
      return lfs.link(s, t, 1)
    end,
    delDir = function(self, d)
      return print(lfs.rmdir(d))
    end,
    walkDir = function(self, path)
      for file in lfs.dir(path) do
        if file ~= "." and file ~= ".." then
          local filepath = path .. "/" .. file
          local attr = lfs.attributes(filepath)
          assert(type(attr) == "table")
          if attr.mode == "directory" then
            walkDir(filepath)
          else
            print(filepath)
            for i, v in pairs(attr) do
              print(i, v)
            end
          end
        end
      end
    end,
    changeDir = function(self)
      for i in ipairs(dirs) do
        local source = base_linux .. "/" .. dirs[i]
        local target = newbase_linux .. "/" .. dirs[i]
        lfs.rmdir(target)
        symlink(source, target)
        lfs.chdir(target)
        printwd()
      end
    end
  }
  _base_0.__index = _base_0
  local _class_0 = setmetatable({
    __init = function() end,
    __base = _base_0,
    __name = "Workspace"
  }, {
    __index = _base_0,
    __call = function(cls, ...)
      local _self_0 = setmetatable({}, _base_0)
      cls.__init(_self_0, ...)
      return _self_0
    end
  })
  _base_0.__class = _class_0
  local self = _class_0
  self.base_linux = ""
  self.base_mac = ""
  self.newbase_linux = ""
  self.newbase_mac = ""
  self.dirs = { }
  Workspace = _class_0
end
